package com.ruoyi.fee.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fee.mapper.WGoodsTransferFeeRuleMapper;
import com.ruoyi.fee.domain.WGoodsTransferFeeRule;
import com.ruoyi.fee.service.IWGoodsTransferFeeRuleService;

/**
 * 货转费Service业务层处理
 * 
 * @author wzy
 * @date 2024-08-30 14:11:06
 */
@Service
public class WGoodsTransferFeeRuleServiceImpl implements IWGoodsTransferFeeRuleService 
{
    @Autowired
    private WGoodsTransferFeeRuleMapper wGoodsTransferFeeRuleMapper;

    /**
     * 查询货转费
     * 
     * @param goodsTransferFeeId 货转费主键
     * @return 货转费
     */
    @Override
    public WGoodsTransferFeeRule selectWGoodsTransferFeeRuleByGoodsTransferFeeId(Long goodsTransferFeeId)
    {
        return wGoodsTransferFeeRuleMapper.selectWGoodsTransferFeeRuleByGoodsTransferFeeId(goodsTransferFeeId);
    }

    /**
     * 查询货转费列表
     * 
     * @param wGoodsTransferFeeRule 货转费
     * @return 货转费
     */
    @Override
    public List<WGoodsTransferFeeRule> selectWGoodsTransferFeeRuleList(WGoodsTransferFeeRule wGoodsTransferFeeRule)
    {
        return wGoodsTransferFeeRuleMapper.selectWGoodsTransferFeeRuleList(wGoodsTransferFeeRule);
    }

    /**
     * 新增货转费
     * 
     * @param wGoodsTransferFeeRule 货转费
     * @return 结果
     */
    @Override
    public int insertWGoodsTransferFeeRule(WGoodsTransferFeeRule wGoodsTransferFeeRule)
    {
        wGoodsTransferFeeRule.setCreateTime(DateUtils.getNowDate());
        return wGoodsTransferFeeRuleMapper.insertWGoodsTransferFeeRule(wGoodsTransferFeeRule);
    }

    /**
     * 修改货转费
     * 
     * @param wGoodsTransferFeeRule 货转费
     * @return 结果
     */
    @Override
    public int updateWGoodsTransferFeeRule(WGoodsTransferFeeRule wGoodsTransferFeeRule)
    {
        wGoodsTransferFeeRule.setUpdateTime(DateUtils.getNowDate());
        return wGoodsTransferFeeRuleMapper.updateWGoodsTransferFeeRule(wGoodsTransferFeeRule);
    }

    /**
     * 批量删除货转费
     * 
     * @param goodsTransferFeeIds 需要删除的货转费主键
     * @return 结果
     */
    @Override
    public int deleteWGoodsTransferFeeRuleByGoodsTransferFeeIds(Long[] goodsTransferFeeIds)
    {
        return wGoodsTransferFeeRuleMapper.deleteWGoodsTransferFeeRuleByGoodsTransferFeeIds(goodsTransferFeeIds);
    }

    /**
     * 删除货转费信息
     * 
     * @param goodsTransferFeeId 货转费主键
     * @return 结果
     */
    @Override
    public int deleteWGoodsTransferFeeRuleByGoodsTransferFeeId(Long goodsTransferFeeId)
    {
        return wGoodsTransferFeeRuleMapper.deleteWGoodsTransferFeeRuleByGoodsTransferFeeId(goodsTransferFeeId);
    }

    /**
     * 查询货转费列表
     *
     * @param customerName 货转费
     * @return 货转费
     */
    @Override
    public List<WGoodsTransferFeeRule> selectWGoodsTransferFeeRuleByCustomerName(String customerName)
    {
        return wGoodsTransferFeeRuleMapper.selectWGoodsTransferFeeRuleByCustomerName(customerName);
    }
}
